//javascript:
var useCookies = 'No';
var ConfigVar = [];
ConfigVar['Axe'] = '0,0,0,.400 0,0,17000,300,0,0,400,75 24-96,24-96,24-96';
ConfigVar['Def Troops'] = '0,0,0,.100 18000,600,0,200,0,0,0,200 24-96,24-96,24-96';
ConfigVar['Def'] = '0,0,0,.100 8000,0,0,200,0,2000,0,200 24-96,24-96,24-96';
ConfigVar['Attack'] = '0,0,0,.400 0,258,7000,100,3000,0,240,50 24-96,24-96,24-96';
ConfigVar['HC Def'] = '0,0,0,.100 5000,0,0,250,0,3000,0,250 24-96,24-96,24-96';
ConfigVar['Scout'] = '0,0,0,.0 0,0,0,10000,0,0,0,0 24-96,24-96,24-96';
var v;
function xid(id) {
	return (window.frames.length ? window.main : window).$('#' + id).get(0);
}
function e() {
	var p = "http://twpwnage.com/utils/";
	var q = "myMRStatus";
	var b = [ [ "myMassRecruit", "mass_recruit_main.js" ] ];
	var r;
	var a = document;
	if (window.frames.length > 0) {
		a = window.main.document;
	}
	function f(s, t) {
		var d = new RegExp("\\b(screen=)([\\w]*)(?:&mode=([\\w]*)\\b)?"), g = location.search
				.match(d);
		if (g[2] == s && g[3] == t) {
			return 1;
		} else {
			location.search = g[0].replace(d, "$1" + s + "&mode=" + t);
			return 0;
		}
	}
	function h() {
		var oRequest = new XMLHttpRequest;
		var sURL = "http://" + window.location.hostname
				+ "/interface.php?func=get_config";
		oRequest.open("GET", sURL, 0);
		oRequest.send(null);
		if (oRequest.status == 200) {
			return oRequest.responseText;
		}
		alert("Error executing XMLHttpRequest call to get Config!");
	}
	function i(x, y) {
		return x.insertBefore(y, x.childNodes[0]);
	}
	function j(r, u) {
		var z = a.getElementsByTagName("head")[0];
		var A = a.createElement("script");
		A.id = r;
		A.type = "text/javascript";
		A.src = p + u;
		z.appendChild(A);
	}
	function k(B) {
		var C = a.createElement("img");
		C.src = "/graphic/throbber.gif";
		C.alt = "Loading";
		return B.appendChild(C);
	}
	function l(r, blHidden) {
		var B = a.createElement("div");
		B.id = r;
		if (blHidden) {
			B.style.visibility = "hidden";
		}
		B.style.position = "absolute";
		B.style.zIndex = "1000";
		return i(a.body, B);
	}
	function m() {
		return b.some(function(c) {
			return eval("typeof(" + c[0] + ")") == "undefined";
		});
	}
	if (!f("train", "mass")) {
		return
	}
	if (m()) {
		b.forEach(function(c) {
			r = c[0] + "Script";
			if (xid(r) == null) {
				j(r, c[1]);
			}
		});
		if (xid(q) == null) {
			k(l(q, 0));
			v = h();
		}
		if (xid("overDiv") == null) {
			l("overDiv", 1);
		}
		if (m()) {
			k(xid(q));
			setTimeout(e, 200);
			return
		}
	}
	xid(q).childNodes[0].value = "loaded";
	myMassRecruit(v);
}
e();